/**
* @describe 业务数据存储
* @author 游金宇(KM)
* @date 2023-08-02 20:10:07
*/

import { CoreStore, Manager } from "@shimotsuki/core"
import LoginStore from "./login"
import LobbyStore from "./lobby"
import RankStore from "./rank"
import UserStore from "./user"
import GameStore from "./game"
import GlobalStore from "./global"
import RoomStore from "./room"


// 扩展 Manager 接口，添加 CoreStore 属性
declare module '@shimotsuki/core' {
    interface CoreStore {
        user: UserStore
        global: GlobalStore
        game: GameStore
        login: LoginStore
        lobby: LobbyStore
        rank: RankStore
        room: RoomStore
    }
}


export class Store extends CoreStore {
    constructor(cat: Manager) {
        super(cat);

        this.user = new UserStore(this)
        this.global = new GlobalStore(this)
        this.game = new GameStore(this)
        this.login = new LoginStore(this)
        this.lobby = new LobbyStore(this)
        this.room = new RoomStore(this)
        this.rank = new RankStore(this)
    }

}


